//
//  OO_AddAddressViewController.m
//  ShopProject
//
//  Created by macbookpro on 2018/9/28.
//  Copyright © 2018年 ShopProject. All rights reserved.
//

#import "OO_AddAddressViewController.h"
#import "KLTextView.h"
#import "YJLocationPicker.h"
@interface OO_AddAddressViewController ()
@property (weak, nonatomic) IBOutlet UITextField *peopleTf;
@property (weak, nonatomic) IBOutlet UITextField *phoneTf;
@property (weak, nonatomic) IBOutlet UIButton *cityButton;
@property (weak, nonatomic) IBOutlet KLTextView *detailAdressTf;

@end

@implementation OO_AddAddressViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"添加收货地址";
    self.detailAdressTf.placeholder = @"请输入详细地址";
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)chooseAddressButtonClicked:(UIButton *)sender {
    [self.view endEditing:YES];
    //直接调用
    [[[YJLocationPicker alloc] initWithSlectedLocation:^(NSArray *locationArray) {
        
        //array里面放的是省市区三级
        NSLog(@"%@", locationArray);
        //拼接后给button赋值
        [sender setTitle:[locationArray componentsJoinedByString:@""] forState:UIControlStateNormal];
        
    }] show];
    
}



@end
